Skip to content

Update koin.core to v4.2.2#136

Open
renovate[bot] wants to merge 1 commit into
masterfrom
renovate/koin.core
Open

Update koin.core to v4.2.2#136
renovate[bot] wants to merge 1 commit into
masterfrom
renovate/koin.core

Conversation

@renovate

@renovate renovate Bot commented Jun 9, 2025

Copy link
Copy Markdown
Contributor

This PR contains the following updates:

Package Change Age Confidence
io.insert-koin:koin-core (source) 4.0.44.2.2 age confidence
io.insert-koin:koin-androidx-compose (source) 4.0.44.2.2 age confidence
io.insert-koin:koin-android (source) 4.0.44.2.2 age confidence

Release Notes

InsertKoinIO/koin (io.insert-koin:koin-core)

v4.2.2: Koin 4.2.2

Compare Source

Maintenance release for the 4.2.x line — resolver regression fixes from the 4.2.0 CoreResolverV2 rewrite, ViewModel/scope fixes, a Ktor request-scope fix, plus new tvOS support and an R8/ProGuard guide.

Anyone hitting resolver issues on 4.2.0/4.2.1 should upgrade to 4.2.2.

Bug Fixes
  • Stacked params no longer shadow qualified dependencies (#​2370, #​2408) — A value passed via parametersOf could be returned for a get(named(...)) request of the same type, shadowing the qualified definition. Qualified lookups are now registry-only and never read the parameter stack — parameters carry no qualifier, so they can't satisfy a qualified request.

  • Root factory no longer resolves its scoped dependencies from _root_ (#​2379) — When a non-single factory defined in the root scope was resolved from a child scope, CoreResolverV2 resolved its scoped dependencies against _root_ instead of the requesting scope. Linked-scope resolution now runs the factory against the requesting scope (single instances keep their root-bound semantics, preserving #​2325).

  • viewModelScopeFactory scope is linked to its parent (#​2299) — A ViewModel scope created via viewModelScopeFactory() was not linked to the originating scope, so dependencies declared in the parent couldn't be resolved. The created scope is now linked to its parent (except when the parent is root).

  • Tolerate non-String environment properties (#​2348) — Loading environment/system properties whose values aren't String threw ClassCastException due to an unchecked map cast. Non-String values are now preserved as Any and only String keys are required.

  • Unique Ktor request-scope ids under concurrency (#​2410) — Concurrent requests could collide on request-scope ids. Ids are now generated from a monotonic counter seeded once at startup. Thanks @​lfavreli-betclic!

  • Actionable errors for SavedStateHandle / viewModelScope { } (#​2044, #​2417) — Resolving SavedStateHandle without the proper extras, or using viewModelScope { } without the viewModelScopeFactory() option, now produces a clear, actionable error message instead of an opaque failure.

Added
  • tvOS targets for koin-core-viewmodel (#​2426) — koin-core-viewmodel now publishes tvosArm64, tvosX64, and tvosSimulatorArm64, unblocking ViewModel usage on tvOS.

  • Consumer R8/ProGuard rules + guide — Android and ViewModel artifacts now ship consumer R8/ProGuard rules in their AARs, and a new R8 / ProGuard guide documents keep rules for minified builds.

Improvements
  • O(1) secondary-type registration in bind() / binds()bind/binds now append secondary types in O(1) instead of reallocating the type list per binding, removing quadratic cost when a definition declares many bindings. No user-visible behavior change.
Documentation
Contributors

Thanks to the following contributors for this release:

v4.2.1: Koin 4.2.1

Compare Source

Support for Compile Safety with Koin Compiler 1.0.0-RC1

Bug Fixes

  • Fix stacked-params lookup on linked scopes (#​2387) — The 4.2.0 resolver rewrite (CoreResolverV2) walked linked scopes but dropped the per-parent stacked-parameters check that 4.1.x performed via recursion. This broke patterns where AndroidParametersHolder is stacked on the factory scope by KoinViewModelFactory and SavedStateHandle is then resolved from a child ViewModel scope. Linked-scope resolution now also checks stacked params on each parent scope.

  • Restore ABI compatibility for runOnKoinStarted (#​2391) — The 4.2.0 release inadvertently broke binary compatibility for runOnKoinStarted on JVM. Fixed by restoring the original JVM class name via @JvmName/@JvmMultifileClass annotations.

  • Fix scope _closed concurrency issue (#​2389) — The Scope._closed flag was not volatile, which could cause stale reads under concurrent access.

Improvements

  • Improved Scope resolution error messagesCoreResolverV2 now provides clearer error messages when scope resolution fails, making it easier to diagnose misconfigured scopes.

  • Added apiCheck to CI — Binary compatibility validation (kotlinx.binary-compatibility-validator) now runs on every PR to prevent future ABI breaks.

Documentation

  • parametersOf type-collision warning (#​2328) — Added a caution note explaining that when a value passed via parametersOf has the same type as the requested definition, Koin returns the value directly and skips the factory block. Suggests using a wrapper type as a workaround.

Contributors

Thanks to the following contributors for this release:

v4.2.0

Compare Source

Kotlin 2.3.20

New Features

  • Ktor 3.4 DI Bridge — Full integration with Ktor's new DI system (ktor-server-di), bridging Ktor ↔ Koin dependency injection both ways
  • Dagger Bridge (koin-dagger-bridge) — New module to help inject Koin components from Dagger side
  • AndroidX Navigation 3 support — Entry point provider with metadata parameter passing (animations, etc.), generic EntryProvider, and navigation scopes
  • Navigation Scope for Compose Nav 2 — Added scoped navigation support for Compose Navigation 2
  • Lazy Modules — Parallel loading at startup for improved performance, with benchmarks
  • strictOverride option — New definition option to override explicitly
  • koinActivityInject — Helper to retrieve dependencies against Activity scope
  • Koin Compiler Stubs — Added stubs for KoinApplication.modules() functions
  • KoinApplication.withConfiguration() — New configuration support

Performance & Stability

  • Core Resolver V2 — Fixed parameter stack propagation, injected params handling, and child scope/ViewModel scope resolution
  • Scope Resolution & Thread Safety — Performance optimization with safer ScopeFactory protecting all operations from parallel calls
  • ThreadLocal loading optimization — Avoid cost per Scope (#​2306)
  • getAll no longer sorted by default — Instances come as declared; sort on purpose if needed
  • Params stack access optimization

Bug Fixes

  • Fix sharedKoinViewModel with type-safe navigation routes (#​2293)
  • Fix qualified name usage in WASM (#​2312)
  • Fix premature release of scope & context in Compose — don't drop in onForgotten (#​2274)
  • Fix crashing declarations for LocalKoinScope & LocalKoinApplication
  • Fix Compose Koin Context Loader and Entry Points (#​2327)
  • Fix CoreResolution with Child Scopes / ViewModelScope (#​2325)
  • Fix Scope Archetypes Qualifier in plugin support functions
  • Fix qualifier conversion

Breaking Changes

  • minSdk raised to 23 for Android
  • module renamed to lazyModule in some contexts
  • BeanDef constructor change (API signature update)

Dependencies

  • Kotlin 2.3.20
  • Ktor 3.4
  • JetBrains Compose 1.10.2
  • AndroidX Lifecycle 2.10.0
  • AndroidX Navigation 2.9.7 / Nav3 1.0.1

v4.1.1

Compare Source

Koin 4.1.1 Changelog

🐛 Bug Fixes

  • Logger Constraint Revert - Reverted logger constraint due to compatibility issues causing errors across projects
  • Maven Central Publication - Fixed publication issues for Maven Central distribution

💥 Breaking Changes for Internal

  • Compose Scope Resolution - Fixed scope resolution issues in Compose integration with proper context handling, introduced ComposeContextWrapper to help manage internal scope state

🚀 Features & Improvements

  • Compose ViewModel Navigation - Added optional navGraphRoute parameter to sharedKoinViewModel for better navigation support
  • Compose Context Handling - Reworked LocalKoinApplication/LocalKoinScope with ContextWrapper to properly handle:
    • Scope closing lifecycle
    • Context restart scenarios
    • Better memory management

⚡ Performance & Core

  • Core Resolver Optimization - Avoid unnecessary flattening operations when dealing with single scope resolution
  • Scope Debugging - Enhanced scope debugging by showing linked scope IDs for better development experience
  • Library Updates - Updated underlying dependencies to latest stable versions

📚 Library Updates

  • Kotlin - Updated to 2.1.21 (from 2.1.20)
  • Binary Validator - Updated to 0.18.1 (from 0.16.3)
  • Ktor - Updated to 3.2.3 (from 3.1.3)
  • Jetbrains Compose - Updated to 1.8.2 (from 1.8.0)
  • AndroidX Libraries:
    • Fragment 1.8.9 (from 1.8.8)
    • WorkManager 2.10.3 (from 2.10.1)
    • Lifecycle 2.9.3 (from 2.9.0)
    • Navigation 2.9.3 (from 2.9.0)
    • JB Navigation RC01 (from Beta01)
  • Testing:
    • Robolectric 4.15.1 (from 4.14.1)
    • Benchmark 0.4.14 (from 0.4.13)
  • Build Tools - Added NMCP 1.1.0 for improved publication workflow

📦 Publication

  • Multi-platform Artifacts - Ensured all platform variants are properly published
  • Version Consistency - Synchronized all module versions across the ecosystem

🔧 Development

  • Test Coverage - Added ActivityScopeArchetypeTest for better scope lifecycle testing
  • API Stability - Maintained backward compatibility while fixing internal issues

👥 Contributors

https://github.com/arnaudgiuliani - Project Lead & Core Developer
https://github.com/rfaturriza - Community Contributor

New Contributors

Full Changelog: InsertKoinIO/koin@4.1.0...4.1.1

v4.1.0

Compare Source

What's Changed
New Contributors

Full Changelog: InsertKoinIO/koin@4.0.4...4.1.0


  • If you want to rebase/retry this PR, check this box

🔕 Ignore: Close this PR and you won't be reminded about these updates again.

@renovate renovate Bot added the dependencies label Jun 9, 2025
@renovate renovate Bot requested a review from hoc081098 June 9, 2025 10:06
@renovate renovate Bot force-pushed the renovate/koin.core branch from cdf0cb4 to 4177c5b Compare August 10, 2025 14:53
@renovate renovate Bot force-pushed the renovate/koin.core branch from 4177c5b to ff2af33 Compare September 3, 2025 21:03
@renovate renovate Bot changed the title Update koin.core to v4.1.0 Update koin.core to v4.1.1 Sep 3, 2025
@renovate renovate Bot force-pushed the renovate/koin.core branch from ff2af33 to 17c444f Compare September 8, 2025 13:36
@renovate renovate Bot force-pushed the renovate/koin.core branch from 17c444f to 62ddd2f Compare October 9, 2025 10:40
@renovate renovate Bot force-pushed the renovate/koin.core branch from 62ddd2f to dab0a27 Compare November 18, 2025 18:43
@renovate renovate Bot force-pushed the renovate/koin.core branch from dab0a27 to 8234e38 Compare December 30, 2025 13:29
@renovate renovate Bot force-pushed the renovate/koin.core branch from 8234e38 to 22382e0 Compare February 2, 2026 14:56
@renovate renovate Bot force-pushed the renovate/koin.core branch from 22382e0 to 0de105d Compare February 27, 2026 12:52
@renovate renovate Bot force-pushed the renovate/koin.core branch 2 times, most recently from 96e7093 to b409ede Compare March 17, 2026 21:24
@renovate renovate Bot changed the title Update koin.core to v4.1.1 Update koin.core to v4.2.0 Mar 17, 2026
@renovate renovate Bot force-pushed the renovate/koin.core branch 2 times, most recently from fe3031c to d48e04b Compare April 8, 2026 17:08
@renovate renovate Bot force-pushed the renovate/koin.core branch from d48e04b to bc41909 Compare April 9, 2026 17:36
@renovate renovate Bot changed the title Update koin.core to v4.2.0 Update koin.core to v4.2.1 Apr 9, 2026
@renovate renovate Bot force-pushed the renovate/koin.core branch from bc41909 to 95ead0e Compare May 21, 2026 20:15
@renovate renovate Bot force-pushed the renovate/koin.core branch from 95ead0e to b0fe3ba Compare June 15, 2026 11:53
@renovate renovate Bot changed the title Update koin.core to v4.2.1 Update koin.core to v4.2.2 Jun 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant